<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>集合遍历</title>
		<script type="text/javascript" src="../js/angular.min.js" ></script>
	</head>
	<script type="text/javascript">
		var mapp = angular.module("myapp",[]);
		mapp.controller("mycontr",["$scope",function($scope){//$scope是一个对象，代表作用域
			$scope.products=[{
				id:1,
				name:"电脑",
				moeny:10000
			},
			{		
				id:2,
				name:"电视",
				moeny:1000
			}
			];
		}])
		
	</script>
	<body ng-app="myapp" ng-controller="mycontr">
		<table width="100px" height="100px" border="1">
			<tr>
				<th>商品编号</th>
				<th>商品名称</th>
				<th>商品价格</th>
			</tr>
			<tr ng-repeat="product in products">
				<td>{{product.id}}</td>
				<td>{{product.name}}</td>
				<td>{{product.moeny}}</td>
			</tr>
		</table>
		
	</body>
</html>
